<template>
	<div>
        <h1>组件</h1>
		<i-button id="btn1" class="btn-submit" @click.native="handleClick">
            <span solt="title"> 按钮</span>
            试试
        </i-button>
	</div>
</template>
<script>
import { mapGetters, mapState, mapActions } from "vuex";
import iButton from "@/components/i-button.vue"
export default {
	data() {
		return {
			userInfo: {},
			noticelList: []
		};
    },
    components: {
       "i-button":iButton  
    },
	created() {
		this.loadData();
	},
	methods: {
		/**
		 * 请求静态数据只是为了代码不那么乱
		 * 分次请求未作整合
		 */
		async loadData() {
			this.userInfo = await this.$apiFn.asyncJson("userInfo");
			this.noticelList = await this.$apiFn.asyncJson("noticelList");
        },
        handleClick(event){
            console.log(event,'数据')
        }
	}
};
</script>

